package com.abapi.pay.core.biz;

import cn.hutool.core.util.HexUtil;
import com.abapi.pay.core.dto.MessageDTO;
import com.alibaba.fastjson.JSON;

/**
 * @Author ldx
 * @Date 2019/10/30 18:26
 * @Description
 * @Version 1.0.0
 */
public class Encode {

    public static byte[] encode(MessageDTO messageDTO){
        String s = "~"+HexUtil.encodeHexStr(JSON.toJSONString(messageDTO))+"~";
        return s.getBytes();
    }

}
